import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

import cookies from 'weapp-cookie'
	// 引入vuex
import Vuex from 'vuex'
import uView from '@/uni_modules/uview-ui'

import store from '@/store'
import Polyfill from './polyfill/polyfill';
Polyfill.init();
import Mixin from './polyfill/mixins';
Vue.mixin(Mixin);

// 引入elementUI开发
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';

// Vue.use(ElementUI);

Vue.use(uView)
// 使用插件
Vue.use(Vuex)


// 配置自定义别名
cookies.config({ requestAlias: 'requestx' })
Object.defineProperty(
  uni, 'requestx', { value: wx.requestx }
)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif